package com.zhx.real.mybatisplus.business;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhanghaixuan
 */
@Data
public class BaseEntity<T extends Model> extends Model<T> {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一Id
     */
    @TableId(value = "uid", type = IdType.ID_WORKER_STR)
    private String uid;

    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;
    /**
     * 禁用标识
     */
    private String delFlag;

    @Override
    protected Serializable pkVal() {
        return this.uid;
    }
}
